package cn.maxhou.t0002;

import cn.maxhou.t0001.SimpleDaoFactory;
import cn.maxhou.tongyon.dao.NewsDao;
import cn.maxhou.tongyon.pojo.News;
import cn.maxhou.tongyon.service.NewsService;

public class NewsServiceImpl implements NewsService {
    //所以来的NewsDao对象
    private NewsDao dao= SimpleDaoFactory.getInstance();

    public void addNews(News news){
        //调用NewsDao的饭是钢发保存新闻信息
        dao.save(news);
    }
}
